package scriptrunner.execution;

public class WhileLoopStatement extends Statement {

	public WhileLoopStatement( CompareExpr ce, StatementList sl )
	{
		this.ce = ce;
		this.sl = sl;
	}
	
	@Override
	public boolean Execute(Session se) throws ExecuteErrorException {
		while ( ce.CalculateResult(se) )
		{
			sl.Execute(se);
		}
		return false;
	}

	CompareExpr ce;
	StatementList sl;
}
